'use strict';

const express = require('express');
const orderController = require('../../app/controllers/order.controller');

module.exports = (app) => {
    app.route('/order/addorder')
    .post(orderController.addOrder);
    app.route('/order/findOrderByOid/:oid')
    .get(orderController.findOrderByOid);

    app.route('/order/findOrderByClient/:cid')
    .get(orderController.findOrderByClient);

    app.route('/order/findOrderByOstateandClient/:cid/:ostate')
    .get(orderController.findOrderByOstateandClient);
    
    app.route('/order/updateOstateByOid/:oid/:oldstate')
    .get(orderController.updateOstateByOid);
};